import request from '@/utils/request'

// 查询信审申请列表
export function creditReviewApplyList(query) {
    return request({
        url: `/creditReview/creditReviewApply/list`,
        method: 'get',
        params:query
    })
}

//导出信审申请列表
export function creditReviewApplyExport(data) {
    return request({
        url: '/creditReview/creditReviewApply/export',
        method: 'post',
        data:data
    })
}

// 提交信审资料规则
export function getSubmitRules(id) {
    return request({
        url: `/creditReview/creditReviewApply//getSubmitRules/${id}`,
        method: 'get'
    })
}

// 提交/重新提交信审
export function submitForCreditReview(data) {
  return request({
    url: '/creditReview/creditReviewApply/submitForCreditReview',
    method: 'post',
    data:data
  })
}

// 重新提交信审回显数据
export function getResubmitData(applicationNo) {
    return request({
        url: `/creditReview/order/getResubmitData/${applicationNo}`,
        method: 'get'
    })
}


// 待补充资料
export function getAddFile(applicationNo) {
  return request({
    url: `/creditReview/order/getAddFile/${applicationNo}`,
    method: 'get'
  })
}

// 补充资料
export function submitAddFile(data) {
    return request({
        url: '/creditReview/order/submitAddFile',
        method: 'post',
        data:data
    })
}

// 作废或撤单
export function voidOrCancelTheOrder(data) {
    return request({
        url: '/creditReview/creditReview/voidOrCancelTheOrder',
        method: 'post',
        data:data
    })
}

// 信审申请详情
export function getCrLimitDetails(applicationNo) {
  return request({
    url: `/creditReview/order/getCrLimitDetails/${applicationNo}`,
    method: 'get'
  })
}

// 信审详情
export function getRecordsDetails(applicationNo) {
  return request({
    url: `/creditReview/order/getRecordsDetails/${applicationNo}`,
    method: 'get'
  })
}

// 查看信审资料详情
export function getFileDetails(applicationNo) {
  return request({
    url: `/creditReview/order/getFileDetails/${applicationNo}`,
    method: 'get'
  })
}

// 作废剩余额度
export function creditReviewInvalid(data) {
    return request({
        url: '/creditReview/creditReviewInvalid',
        method: 'post',
        data:data
    })
}

// 补充资料-查看
export function getAddFileInfo(id) {
    return request({
        url: `/creditReview/creditReview/getAddFileInfo/${id}`,
        method: 'get'
    })
}


// 获取信审申请详细信息
export function creditReviewApplyDetails(id) {
    return request({
        url: `/creditReview/creditReviewApply/${id}`,
        method: 'get'
    })
}
